package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.MainCate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MainCateMapper extends MyMapper<MainCate> {

    MainCate findMainCateById(@Param("id") Integer id);

    @Select("SELECT tmc.* from t_main_cate tmc  WHERE tmc.id=#{id}")
    List<MainCate> findMainCateLsitId(@Param("id") Integer id);

    @Select("SELECT * FROM t_main_cate t WHERE t.id !=#{id} ")
    List<MainCate> findMainCateName(@Param("id") Integer id);

    List<MainCate> findMainCate();

    List<MainCate> findMainCateList(@Param("id") Integer id);

    List<MainCate> findStyles();

    List<MainCate> findCategorys();

    public Integer findCategoryCount();
}
